Use addQuotes() as needed in MergeHistory pager
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 27 Aug 2014 23:49:34 +0000 (16:49 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 27 Aug 2014 23:49:34 +0000 (16:49 -0700)
Change-Id: Ibf15ff303cf9641a0ce3da855a88d8276fb21ff1

includes/specials/SpecialMergeHistory.php

index 6efc12b..492eb3b 100644 (file)
@@ -496,7 +496,7 @@ class MergeHistoryPager extends ReverseChronologicalPager {
        /** @var array */
        public $mConds;
 
-       function __construct( $form, $conds = array(), $source, $dest ) {
+       function __construct( $form, $conds, $source, $dest ) {
                $this->mForm = $form;
                $this->mConds = $conds;
                $this->title = $source;
@@ -550,7 +550,7 @@ class MergeHistoryPager extends ReverseChronologicalPager {
        function getQueryInfo() {
                $conds = $this->mConds;
                $conds['rev_page'] = $this->articleID;
-               $conds[] = "rev_timestamp < {$this->maxTimestamp}";
+               $conds[] = "rev_timestamp < " . $this->mDb->addQuotes( $this->maxTimestamp );
 
                return array(
                        'tables' => array( 'revision', 'page', 'user' ),